<%@ page contentType="text/html; charset=UTF-8" session="true" import="apli.conectar.Conectar,basedatos.BaseDatos,basedatos.Resultado,basedatos.Fecha,java.util.LinkedList,utilidades.*,java.io.*" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ACTA DE ENTREGA</title>
<link rel="shortcut icon" href="sia.ico">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style3 {font-family: Arial, Helvetica, sans-serif;

}
.style12 {font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
}
body {
	margin-top: 50px;
}
.style7 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style13 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16;
}
.style15 {
	font-size: 16px;
	font-weight: bold;
}
.style23 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16; }
.style24 {font-size: 16}
.Estilo4 {color: #000000; font-weight: bold; }
.Estilo6 {color: #000033; font-weight: bold; }

.pie {
  font-family      : Arial, Helvetica, sans-serif;
  font-size        : 9px;
  color            : #58595B;
  padding-left     : 0px;
  padding-right    : 0px;
  } 
-->
</style>
 </head>


    
<object id="factory" viewastext  style="display:none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="ScriptX.cab#Version=6,2,433,14">
	</object>
<script>
function impresion()
	{
	// el elemento con id "botones" podria ser un DIV que a su vez tenga a los botones como tal, por tanto el numero de botones es 			indiferente
	 x_botones=document.getElementById("botones").innerHTML;    
	 document.getElementById("botones").innerHTML="";
     //x_botones2=document.getElementById("encabezado").innerHTML;    
	 document.getElementById("encabezado").innerHTML="";
	 var y=setTimeout("document.getElementById('botones').innerHTML=x_botones",700);
   //  var x=setTimeout("document.getElementById('encabezado').innerHTML=x_botones2",700);
	  factory.printing.leftMargin = 0; //10;
	 factory.printing.topMargin = 0;
     factory.printing.rightMargin = 0; //10;
     factory.printing.bottomMargin = 0; //20;
     factory.printing.header = "" 
     factory.printing.footer = ""
     factory.printing.Print(true);

	}
</script>

<script language="JavaScript">
function doPrint(){
document.all.item("noprint").style.visibility='hidden' 
window.print()
document.all.item("noprint").style.visibility='visible'
}
</script>
<%
Fecha F =new Fecha();
Conectar CN=new Conectar();
BaseDatos db = CN.getBaseDatos();
Resultado RCS  = new Resultado();
Resultado RCS2  = new Resultado();
Cadena C = new Cadena();
String natural="";
String juridico="";
String CONTRATO = C.validarParametro(request.getParameter("id"));



			
	    String SQLx = " select T.codigo,T.nombres+' '+T.apellidos as clientex, T.nombres, T.apellidos,T.tipodoc+T.docid as id,T.identificacion,T.celular,T.telefono, T.zona+','+T.avcalle+','+T.des_inmuemble+' N '+T.nro_inmueble+' Piso '+T.piso_inmueble as direccion, T.tipoinmueble,T.ciudad,T.email,T.fnacimiento,T.sexo,T.tipoinmueble,T.zona,T.fecha_registro, case when T.tipodoc='E' or T.tipodoc='P' then 'Extranjero' else 'Venezolana' end as nacionalidad, case when T.tipodoc='V' or T.tipodoc='P' then 'Natural' else 'Juridica' end as tp_persona, M.municipio as des_munt,E.estado as des_estt, CN.contrato, CN.fecha, CN.zona+', '+CN.tipoinmueble+', '+CN.avcalle+', '+CN.des_inmuemble+', '+CN.nro_inmueble+', '+CN.piso_inmueble as direccion_contrato, CN.zona, V.descripcion as vendedor, CN.tipo as tipo_contrato from clientes T, contratos CN, vendedores V,municipios M,estados E where  T.municipio=M.cod and E.cod=M.estado and CN.cliente=T.codigo and CN.contrato='"+CONTRATO+"' and V.cod=CN.vendedor";
			//out.print(SQLx);
		RCS=db.consultar(SQLx);
	

			if(RCS.RP==true){

		 

		 
		 


%>



<body>
<!-- MeadCo ScriptX Factory Component -->
	<!-- ********************************************************************************* -->
	<!-- * DO NOT copy this codebase - it can change at any time                         * -->
	<!-- * download the (free) ScriptX Resource Kit and store the cab on your own server * -->
	<!-- * ***************************************************************************** * -->
	<object id="factory" classid="clsid:1663ED61-23EB-11D2-B92F-008048FDD814" codeBase="http://codestore.meadroid.com/products/scriptx/binary.ashx?version=6,4,438,06&filename=smsx.cab&refsrc=http://www.meadroid.com/scriptx/docs/samples/rawprinting/sample.aspx#Version=6,4,438,06" viewastext>
		
	</object>

<table width="815" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="81" colspan="2" align="right">
      <img src="logo_movilmax.jpg" align="right"></td>
  </tr>
  <tr>
    <td colspan="2" align="right" valign="middle" class="gris">&nbsp;</td>
  </tr>
  <tr>
    <td width="183">&nbsp;</td>
    <td width="632">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="right" class="style3">Caracas, <b><%out.print(F.formateaFecha(RCS.getCadena("fecha"),false )  );%></b><br />
    Nro. de Contrato: <span class="Estilo4"><%out.print(CONTRATO);%></span></div></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top"><p align="center" class="style7 style15"></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top"><div align="center"><span class="style7 style15 style3">ACTA DE ENTREGA DE EQUIPO</span></div></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top"><div align="center"></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><span class="style3">Yo,<span class="Estilo4"><%out.print(" "+RCS.getCadena("clientex"));%></span>, mayor de edad, de este domicilio y titular de la c&eacute;dula de identidad Nro. <span class="Estilo6"><% out.print(" "+RCS.getCadena("identificacion"));%></span>, he recibido conforme el (los) siguiente(s) equipo(s): </span></td>
  </tr>
  <tr>
    <td colspan="2"><div align="center" class="style7">
      <div align='justify' class="style3"><BR><table width="100%" border="1" cellspacing="0" cellpadding="0">
     
          <td width="50%"><div align="center" class="style12"><B>Equipo</B></div></td>
          <td width="30%"><div align="center" class="style12"><B>Serial</B></div></td>
		  <td width="20%"><div align="center" class="style12"><B>Mac</B></div></td>
          
          <%
    SQLx = "select D.contrato,X.mac,X.serial_adm,X.serial_fabrica,(X.tipo+'  '+X.marca+'  '+X.modelo ) as equipo,case when D.status='0' then 'CORTADO' else 'ACTIVO' end as stx,P.descripcion as des_servicio from detalle_contrato D,dispositivos X,productos P where X.mac=D.mac and D.servicio=P.codigo and D.contrato='"+CONTRATO+"'";

			//out.print(SQLx);
		RCS2=db.consultar(SQLx);
	

			if(RCS2.RP==true){
		 
		 
			}
	%>
          </tr>
          <tr>
          <td><div align="center" class="style12"><%out.print(" "+RCS2.getCadena("equipo"));%></div></td>
          <td><div align="center" class="style12"><%out.print(" "+RCS2.getCadena("serial_adm"));%></div></td>
		  <td><div align="center" class="style12"><%out.print(" "+RCS2.getCadena("mac"));%></div></td>

          </tr>
      </table>
</div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
<tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><span class="style13">Recib&iacute; Conforme:</span></td>
    <td><span class="style24"></span></td>
  </tr>
  <tr>
    <td colspan="2" valign="top"><p align='justify' class="style13"><span class="style1"></span></p>    </td>
  </tr>
  <tr>
    <td colspan="2"><span class="style13">NOMBRE Y APELLIDO  <strong><%out.print(" "+RCS.getCadena("clientex"));%></strong></span><span class="style24"><br />
    </span></td>
  </tr>
  <tr>
    <td colspan="2"><span class="style13">C.I/R.I.F: <span class="Estilo4"><%out.print(" "+RCS.getCadena("identificacion"));%></span></span></td>
  </tr
  ><tr>
    <td height="23" colspan="2" align="center"><span class="pie"><span class="nueva">Av Los Cedros, La Florida Edif.Movilmax  Apartado 1050 Caracas – Venezuela</span><br />
    </span></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><span class="pie"><span class="nueva">Telefonos +58 (212) 213.07.07 Fax: +58 (212) 213.07.31</span></span></td>
  </tr>
</table>

<div id=noprint>
<div id='botones'>
  <input name="Imprimir" type="button" class="inputbox2" onClick="doPrint()" value="Imprimir" />
</div>
</div>

</body>
<% 			}
		 
		 %>
</html>
